The present invention relates to a code converting system for converting a digital signal consisting of a given number of bits into one consisting of a different number of bits, and more particularly to a code converting system suited to encoders for bandwidth compression of television signals or the like.
One known system for efficiently encoding multi-level signals including television signals is the predictive encoding system disclosed in U.S. Pat. No. 4,133,006. This encoding system is disclosed to include a code converting system for further efficient encoding of prediction error signals. One such prior art code converting system comprises, as described in U.S. Pat. No. 4,534,055 a run-length encoder for run-length encoding of the level having the highest frequency of occurrence (level 0 for instance) in the prediction error signals, and a variable length encoder for variable length encoding of all other levels. This prior art converter however, has the disadvantage that, during a period when the highest occurrence frequency level is generated continuously, the quantity of information generated becomes too small, resulting in underflow of the buffer memory used in the predictive encoder.
To avoid such underflow, in the prior art, compression encoding, such as predictive encoding, is suspended when the contents or occupancy of the buffer memory falls below a certain level, whereupon input signals are transmitted intact as pulse code modulated (PCM) signals. This method, however, has the following three disadvantages:
(a) Because of the great increase in the quantity of information that is generated when compression is suspended and PCM transmission is begun, the occupancy of the buffer memory will sharply increase. As a result, a rough encoding mode must be employed to avoid overflow of the buffer memory, and this invites a deterioration of the picture quality of decoded signals.
(b) The hardware structure is complicated by the need for controls for altering the encoding method.
(c) The alteration of the encoding method cannot be finely controlled.